import service from '@/utils/request'

const SleepApi = {
  addSleep: function (data) {
    return service.post('sleep', data)
  },
  deleteSleep: function (data) {
    return service.put('sleep/delete', data)
  },
  editSleep: function (data) {
    return service.put('sleep', data)
  },
  listSleep: function (data) {
    return service.get('sleep/page', {params: data })
  },
  getSleepInfo: function (data) {
    return service.get('sleep', {params: data })
  },
  getSleepDetectionList: function (data) {
    return service.get('sleep/list', {params: data })
  },
}

export default SleepApi
